import pandas as pd
from matplotlib import pyplot as plt

plt.style.use('fivethirtyeight')

data = pd.read_csv('fill_line_plot_data.csv')

fig, (ax1, ax2) = plt.subplots(nrows=2, ncols=1, sharex=True)

ax1.plot(data['Age'], data['All_Devs'], linestyle='--', label='All Devs')
# ax1.set_xlabel('Ages')
ax1.set_ylabel('Median Salary(usd)')
ax1.set_title('Median Salary(USD) by Age')
ax1.legend(loc='upper left')


ax2.plot(data['Age'], data['Python'], label='Python')
ax2.plot(data['Age'], data['JavaScript'], label='JavaScript')
ax2.set_xlabel('Ages')
ax2.set_ylabel('Median Salary(usd)')
# ax2.set_title('Median Salary(USD) by Age')
ax2.legend(loc='upper left')

plt.tight_layout()
plt.show()
